setTimeout(function() {
    console.log(`I've done my work!`);
}, 2000);
console.log(`I'm waiting for all my work to finish.`);

var fs = require('fs');
fs.open(
    './src/chapter03/info.txt', 'r',
    function(err, handle) {
        if(err) { // 异常处理
            console.log('Error:' + err.code + '(' + err.message + ')');
            return;
        }
        var buf = new Buffer(100000);
        fs.read(handle, buf, 0, 100000, null, 
            function(err, length) {
                if(err) { // 异常处理
                    console.log('Error:' + err.code + '(' + err.message + ')');
                    return;
                }
                console.log(buf.toString('utf8',0, length));
                fs.close(handle, 
                    function () {
                        console.log('file closed');
                    })
            })
    }
)